package cn.chengpengper.seckill.user.infrastructure.repository;

import cn.chengpengper.seckill.user.domain.model.entity.SeckillUser;
import cn.chengpengper.seckill.user.domain.repository.SeckillUserRepository;
import cn.chengpengper.seckill.user.infrastructure.mapper.SeckillUserMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * @author chengpeng.hu
 */
@Component
@RequiredArgsConstructor
public class SeckillUserRepositoryImpl implements SeckillUserRepository {

    private final SeckillUserMapper seckillUserMapper;

    @Override
    public SeckillUser getSeckillUserByUserName(String userName) {
        return seckillUserMapper.getSeckillUserByUserName(userName);
    }

    @Override
    public SeckillUser getSeckillUserByUserId(Long userId) {
        return seckillUserMapper.getSeckillUserByUserId(userId);
    }
}
